package com.bj.barcode;

import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**/
public class HeartBeatTask extends TimerTask {

	private static final int STATISTICS_SCHEDULE_HOUR = 0;
	private static boolean isRunning = false;
	Log logger = LogFactory.getLog(HeartBeatTask.class);
	private Timer timer;
	private String uuid;
	private AutoClickBarcode click;
	/**
	 * @param timer  1、Timer在获取到返回值后销毁！
	 * @param click  2、便于调用http client方法！
	 * @param uuid
	 */
	public HeartBeatTask(Timer timer,AutoClickBarcode click,String uuid) {
		this.timer=timer;
		this.click=click;
		this.uuid=uuid;
	}

	@Override
	public void run() {
		if (!isRunning) {
			isRunning = true;
			//logger.info("HeartBeatTask: 开始执行指定任务");
			executeTask();
			isRunning = false;
			//logger.info("HeartBeatTask: 指定任务执行结束");
		} else {
			logger.info("HeartBeatTask:上一次任务执行还未结束");
		}

	}

	public void executeTask() {
	}
}
